<template>
      <div class="default-table-detail-container">
            <BaseTableInfo v-model="baseTableInfoModel" />
      </div>
</template>

<script lang="ts" setup>

import DrillExamRecordDetailApi from '/@/api/DrillExamRecordDetailApi.ts';

const props = defineProps({
      modelValue: {

      }
})
const route = useRouter()

const baseTableInfoModel = ref({
      columnCount: 3,
      autoFit: false,
      columnWidth: '300px',
      labelWidth: '100px',
      title: '订单基本信息',
      modelData: {},
      itemList: [
            {
                  title: '',
                  items: [   //渲染样式区域  通过key ===model 中的值
                        {
                              label: "id",
                              field: "id",
                        },
                        {
                              label: "公司ID",
                              field: "companyId",
                        },
                        {
                              label: "考试ID",
                              field: "examInfoId",
                        },
                        {
                              label: "试卷id",
                              field: "examPaperId",
                        },
                        {
                              label: "员工id",
                              field: "staffId",
                        },
                        {
                              label: "姓名",
                              field: "staffName",
                        },
                        {
                              label: "身份证",
                              field: "staffIdentity",
                        },
                        {
                              label: "用户id",
                              field: "userKey",
                        },
                        {
                              label: "手机号",
                              field: "phone",
                        },
                        {
                              label: "记录id",
                              field: "recordId",
                        },
                        {
                              label: "题目id",
                              field: "subjectId",
                        },
                        {
                              label: "题目内容",
                              field: "subjectContent",
                        },
                        {
                              label: "选项A",
                              field: "optionA",
                        },
                        {
                              label: "选项B",
                              field: "optionB",
                        },
                        {
                              label: "选项C",
                              field: "optionC",
                        },
                        {
                              label: "选项D",
                              field: "optionD",
                        },
                        {
                              label: "选项E",
                              field: "optionE",
                        },
                        {
                              label: "选项F",
                              field: "optionF",
                        },
                        {
                              label: "用户答案",
                              field: "userOptions",
                        },
                        {
                              label: "正确答案",
                              field: "answer",
                        },
                        {
                              label: "分数",
                              field: "score",
                        },
                        {
                              label: "结果",
                              field: "correct",
                        },
                        {
                              label: "备选1",
                              field: "spareOne",
                        },
                        {
                              label: "备选2",
                              field: "spareTwo",
                        },
                        {
                              label: "备选3",
                              field: "spareThree",
                        },
                        {
                              label: "备选4",
                              field: "spareFour",
                        },
                        {
                              label: "创建人",
                              field: "creator",
                        },
                        {
                              label: "修改人",
                              field: "reviser",
                        },
                        {
                              label: "排序",
                              field: "sort",
                        },
                        {
                              label: "创建时间",
                              field: "create_time",
                        },
                        {
                              label: "更新时间",
                              field: "update_time",
                        },
                  ]
            }
      ],
      buttons: [   //标题操作区域
            // {
            //   name: "更多",
            //  buttonClass: 'danger',
            // width: 100,
            // click: (any: object) => {   //暴露的方法钩子
            // $baseMessage("这里执行业务", 'success', 'vab-hey-message-success');
            //},
            //},


      ]
})

onMounted(async () => {
      //初始化数据model
      const { data } = await DrillExamRecordDetailApi.getDetail({
            drillExamRecordDetailId: props.modelValue.query.drillExamRecordDetailId   //从路由中获取参数
      })
      baseTableInfoModel.value.modelData = data;





})
</script>

<style lang="scss" scoped>
.default-table-detail-container {
      :deep() {
            .el-form--inline {
                  .el-form-item {
                        margin-right: 10px;
                  }
            }

            .el-descriptions__label {
                  min-width: 80px !important;
                  text-align: right;
            }
      }
}
</style>
